<script setup lang="ts">
import { storeToRefs } from 'pinia';
import { computed, reactive } from 'vue';
import Echarts from '@/components/ref-echarts/ref-echarts.vue';

import useClubStore from '@/store/main/club/club';
const clubStore = useClubStore()
clubStore.joinDataAction()
const { clubJoinedData } = storeToRefs(clubStore)
const squareOption = reactive({
  title: {
    text: '社团人数',
    left: 'center'
  }, 
  tooltip: {
    trigger: 'item'
  },
  legend: {
    orient: 'vertical',
    left: 'left'
  },
  series: [
    {
      name: '参与人数',
      type: 'pie',
      radius: '50%',
      data:clubJoinedData,
      emphasis: {
        itemStyle: {
          shadowBlur: 10,
          shadowOffsetX: 0,
          shadowColor: 'rgba(0, 0, 0, 0.5)'
        }
      }
    }
  ]
})

</script>

<template>
	<div :style="{ width: '1230px', height: '700px' }">
		<Echarts :option="squareOption" />
	</div>
</template>
<style lang="less">

</style>